home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / tclx7_31.z / tclx7_31 / tcldev / tclX7.3a-p1 / tksrc / Makefile < prev    next >
Encoding:
Makefile  |  1994-01-25  |  4.8 KB  |  149 lines

  1. # Generated automatically from Makefile.in by configure.
  2. #
  3. # tksrc/Makefile.in --
  4. #
  5. # Makefile to build a wish with Extended Tcl (wishx).
  6. #------------------------------------------------------------------------------
  7. # Copyright 1992-1993 Karl Lehenbauer and Mark Diekhans.
  8. #
  9. # Permission to use, copy, modify, and distribute this software and its
  10. # documentation for any purpose and without fee is hereby granted, provided
  11. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  12. # Mark Diekhans make no representations about the suitability of this
  13. # software for any purpose.  It is provided "as is" without express or
  14. # implied warranty.
  15. #------------------------------------------------------------------------------
  16. # $Id: Makefile.in,v 3.2 1993/12/02 03:56:12 markd Exp $
  17. #------------------------------------------------------------------------------
  18. #
  19. SHELL = /bin/sh
  20.  
  21. #------------------------------------------------------------------------------
  22. # Autoconfig defines that can be overridden in Config.mk
  23.  
  24. CC          = cc
  25. RANLIB      = ranlib
  26. MCS         = touch
  27. srcdir      = .
  28. srcbasedir  = /home/david/src/tcldev/tclX7.3a-p1
  29. bldbasedir  = /home/david/src/tcldev/tclX7.3a-p1
  30. VPATH       = .
  31. prefix      = $(ROOT)/usr
  32. exec_prefix = ${prefix}
  33. ARCH        = 
  34. XINCLUDES   =  -I/usr/X386/include
  35. LIBS        =  -lieee
  36. XLIBSW      = -L/usr/X386/lib -lX11
  37.  
  38. #------------------------------------------------------------------------------
  39. # Include user-editable defines.
  40.  
  41. include ${bldbasedir}/Config.mk
  42.  
  43. #------------------------------------------------------------------------------
  44.  
  45. LIBTK.A      = ${bldbasedir}/tkmaster/lib${ARCH}/libtk.a
  46. LIBTKX.A     = ${bldbasedir}/tkmaster/lib${ARCH}/libtkx.a
  47. WISHX        = ${bldbasedir}/tkmaster/bin${ARCH}/wishx
  48. APPINIT      = ${bldbasedir}/tkmaster/src/tkXAppInit.c
  49. SYSLIBS      = ${bldbasedir}/tkmaster/src/SYSLIBS${ARCH}
  50. TKXMAINPP.O  = ${bldbasedir}/tkmaster/lib${ARCH}/tkXmain++.o
  51.  
  52. LIBTCL.A  = ${bldbasedir}/tclmaster/lib${ARCH}/libtcl.a
  53. LIBTCLX.A = ${bldbasedir}/tclmaster/lib${ARCH}/libtclx.a
  54.  
  55. # The ordering of the libraries is important.  Some X libs on SysV include
  56. # "random" in a BSD module.  This would conflict with the one in the Tcl
  57. # library if it was brought in.
  58.  
  59. LDLIBS = ${LIBTKX.A} ${LIBTK.A} ${XLIBSW} ${LIBTCLX.A} ${LIBTCL.A} -lm ${LIBS}
  60.  
  61. CC_FLAGS = ${CPPFLAGS} ${XCFLAGS} ${CFLAGS} \
  62.            -I${srcbasedir}/src -I${bldbasedir}/src -I${srcbasedir}/tksrc \
  63.            -I${TK_UCB_SRC} -I${TCL_UCB_SRC} ${XINCLUDES}
  64.  
  65. .c.o:
  66.     ${CC} ${CC_FLAGS} -c $<
  67.  
  68. #------------------------------------------------------------------------------
  69.  
  70. OBJS=tkXinit.o   tkXmain.o  tkXshell.o  tkXdata.o
  71.  
  72. UCBOBJS=tkWindow.o
  73.  
  74. #------------------------------------------------------------------------------
  75. # Compile the TkX library and link wishx.  If the link fails, purge
  76. # the executable, as some systems leave invalid executables around.
  77.  
  78. all: made.tmp ${WISHX} ${APPINIT} ${SYSLIBS} ${TCL_PLUS_BUILD}
  79.  
  80. ${WISHX}: tkXAppInit.o ${LIBTKX.A} ${LIBTK.A} ${LIBTCLX.A} ${LIBTCL.A} made.tmp
  81.     ${CC} ${CC_FLAGS} ${XLDFLAGS} tkXAppInit.o ${LDLIBS} ${XLDLIBS} \
  82.         -o ${WISHX} || (rm -f ${WISHX}; exit 1)
  83.     if ${DO_STRIPPING} ; then \
  84.         strip ${WISHX}  ;\
  85.         ${MCS} ${WISHX} ;\
  86.     else \
  87.         exit 0 ;\
  88.     fi
  89.  
  90. made.tmp ${LIBTKX.A}: ${OBJS} ${UCBOBJS}
  91.     ${AR} cr ${LIBTKX.A} ${OBJS} ${UCBOBJS}
  92.     ${RANLIB} ${LIBTKX.A}
  93.     touch made.tmp
  94.  
  95. tkWindow.o: tkWindow.c
  96.     MASTER=${TK_MASTERDIR}/`../tools/tkxversion` ;\
  97.     ${CC} -c -I${TK_UCB_SRC} ${CC_FLAGS} ${DEFS} \
  98.         -DTK_LIBRARY=\"$$MASTER\" tkWindow.c
  99.  
  100. tkWindow.c: ${TK_UCB_SRC}/tkWindow.c
  101.     rm -f tkWindow.c
  102.     echo '#include "tclXconfig.h"' >tkWindow.c
  103.     cat ${TK_UCB_SRC}/tkWindow.c  >>tkWindow.c
  104.  
  105. tkXinit.o: tkXinit.c
  106.     MASTER=${TK_MASTERDIR}/`../tools/tkxversion` ;\
  107.     ${CC} -c ${CC_FLAGS} -DTK_MASTERDIR=\"$$MASTERDIR\" \
  108.             ${srcdir}/tkXinit.c
  109.  
  110. ${APPINIT}: tkXAppInit.c
  111.     rm -f ${APPINIT}
  112.     cp ${srcdir}/tkXAppInit.c ${APPINIT}
  113.  
  114. ${SYSLIBS}: SYSLIBS
  115.     rm -f ${SYSLIBS}
  116.     cp SYSLIBS ${SYSLIBS}
  117.  
  118. #------------------------------------------------------------------------------
  119. # Make sure tkXmain.c compiles and links with C++.
  120.  
  121. TCL_PLUS: wishx++ ${TKXMAINPP.O}
  122.  
  123. wishx++: tkXmain++.o made.tmp
  124.     ${CC} ${CC_FLAGS} ${XLDFLAGS} tkXAppInit.o ${LDLIBS} ${XLDLIBS} \
  125.         -o wishx++ || (rm -f wishx++; exit 1)
  126.  
  127. tkXmain++.o: tkXmain++.C
  128.     ${CCPLUS} -c -I${CPLUSINCL} ${CC_FLAGS} tkXmain++.C
  129.  
  130. tkXmain++.C: tkXmain.c
  131.     rm -f tkXmain++.C
  132.     cp ${srcdir}/tkXmain.c tkXmain++.C
  133.  
  134. ${TKXMAINPP.O}: tkXmain++.o
  135.     rm -f ${TKXMAINPP.O}
  136.     cp tkXmain++.o ${TKXMAINPP.O}
  137.  
  138. #------------------------------------------------------------------------------
  139. clean:
  140.     -rm -f made.tmp tkXmain++.C tkXAppInit.o tkWindow.c
  141.     -rm -f ${OBJS} ${UCBOBJS} tkXmain++.o ${WISHX} wishx++
  142.  
  143. #------------------------------------------------------------------------------
  144. # Restore to the distributed state.
  145.  
  146. distclean: clean
  147.     rm -f Makefile SYSLIBS
  148.